package com.awesome.spring.nacos.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: awesome-spring
 * @description: 控制器类
 * @author: Alex Wu
 * @createDate: 2025-02-06 14:40
 **/

@RestController
@RefreshScope
public class NacosController {

    @Value("${config.appName}")
    private String appName;

    @GetMapping("/nacosConfigTest")
    public String nacosConfigTest() {
        return appName;
    }


}
